import React, { Component } from 'react';
import pic from  '../assets/1.jpg'
import '../styles/Onelist.scss'
class Onelist extends Component {
    //定义数据
     

    constructor(){
        super();
        this.state={
            list:[
                {pic,name:'护肤'}, {pic,name:'彩妆'}, {pic,name:'香氛'},{pic,name:'进口酒'}, {pic,name:'国产酒'}, {pic,name:'精品奢货'}, {pic,name:'食品百货'}, {pic,name:'母婴专区'}, {pic,name:'直播专区'}, {pic,name:'特卖专场'},
            ]
        }
    }
    render() {
        return (
            <div className='onelist'>
                {
                this.state.list.map((item,index)=>{
                  return(
                    <div className='item' key={index}>
                       <img src={item.pic} alt="" />
                       <div className="text">{item.name}</div>
                    </div>
                  )
                })

                }
            </div>
        );
    }
}

export default Onelist;